#coding:utf-8
import requests as req
import sys,cookielib
url="http://59.78.108.52/WebUI/login.aspx"
data={'__VIEWSTATE':'dDwtNjM2NzQ3MzAxOzs+kIREZtxvBloFy1yaS6V40DZr9UU=',
      'username':'Y30150681',
      'password':'83633036',
      'btnlogin':'登录(Login)'
      }
response=req.post(url,data=data)
if "script" in response.text:
 print "密码错误"
else:
 session=req.session()
 result=session.post(url,data=data)
 cookies=req.utils.dict_from_cookiejar(session.cookies)
 print cookies
 '''url2="http://59.78.108.52/WebUI/left.aspx?id=83"
 res=req.post(url)
 print res.text'''
